import * as types from '../actionTypes'
export default (state = { activitys: [] }, action) => {
  if(action === undefined)return state
  switch (action.type) {
    case types.ADDACTIVITY:
      state.activitys.push({ 'text': action.text, 'id': Date.now() })
      return JSON.parse(JSON.stringify(state))
    default:
      return state
  }
}